package day09;

public class AbstractPrc01 {
    public static void main(String[] args) {
        Student s1 = new Student();
        s1.eat();
        s1.play2();
        People ps1=(People) s1;
        ps1.play();
    }
}
abstract class People{
    String name;
    int age;
    public People() {

    }

    public People(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public void eat(){
        System.out.println("人人都要吃饭");
    }
    public void sleep(){
        System.out.println("人人都要睡觉");
    }
    public abstract void play();
    public abstract void play2();
}
class Student extends People{
    public Student(){
        super();
    }
    @Override
    public void play() {
        System.out.println("实现父类中的抽象方法");
    }

    @Override
    public void play2() {
        System.out.println("父类中的抽象方法都要实现");
    }
}